package cn.iocoder.yudao.module.im.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * IM 错误码枚举类
 * 
 * im 系统，使用 1-008-000-000 段
 *
 * @author 芋道源码
 */
public interface ErrorCodeConstants {

    // ========== 消息模块 1008001000 ==========
    ErrorCode MESSAGE_NOT_EXISTS = new ErrorCode(1008001000, "消息不存在");
    ErrorCode MESSAGE_TYPE_INVALID = new ErrorCode(1008001001, "消息类型无效");
    ErrorCode MESSAGE_CONTENT_EMPTY = new ErrorCode(1008001002, "消息内容不能为空");
    ErrorCode MESSAGE_CONTENT_TOO_LONG = new ErrorCode(1008001003, "消息内容过长，当前长度：{0}");
    ErrorCode SEND_FREQUENCY_LIMIT = new ErrorCode(1008001004, "发送消息过于频繁，请等待 {0} 秒后重试");
    
    // ========== 用户模块 1008002000 ==========
    ErrorCode USER_NOT_EXISTS = new ErrorCode(1008002000, "用户不存在");
    ErrorCode CONTACT_NOT_EXISTS = new ErrorCode(1008002001, "联系人不存在");
    ErrorCode NOT_FRIEND = new ErrorCode(1008002002, "对方不是您的好友");
    ErrorCode FRIEND_NOT_FOUND = new ErrorCode(1008002003, "您不是对方的好友");
    
    // ========== 群组模块 1008003000 ==========
    ErrorCode GROUP_NOT_EXISTS = new ErrorCode(1008003000, "群组不存在");
    ErrorCode NOT_GROUP_MEMBER = new ErrorCode(1008003001, "您不是群组成员");
    ErrorCode GROUP_USER_MUTED = new ErrorCode(1008003002, "您已被禁言至 {0}");
    
    // ========== 权限模块 1008004000 ==========
    ErrorCode CHAT_FORBIDDEN = new ErrorCode(1008004000, "聊天功能已禁用");
    ErrorCode SIMPLE_CHAT_FORBIDDEN = new ErrorCode(1008004001, "单聊功能已禁用");
    ErrorCode MESSAGE_UNDO_PERMISSION_DENIED = new ErrorCode(1008004002, "无权撤回此消息");
    ErrorCode MESSAGE_UNDO_TIME_EXPIRED = new ErrorCode(1008004003, "撤回时间已过期");

}